#ifndef GENERAL_H_
#define GENERAL_H_

/* Limits */
#define MAX_COMMAND_LEN 25
#define MAX_DIR_LEN     50
#define MAX_USER_LEN    50
#define MSGSIZE         200
#define MAX_NAME_LEN    50
#define MAX_FIFO_LEN    100
#define BUF_SIZE        1024
#define BUF_LEN         1024
#define FILE_LEN        1024
#define MAX_LOG_LEN     1024

#define COM_CONNECT     1
#define COM_NAME        2
#define COM_LIST        3
#define COM_ADD         4
#define COM_REMOVE      5
#define COM_CLOSE       6
#define COM_COMMIT      7
#define IS_SYNC         41
#define IS_BUSY         80
/*Commit type*/

#define DEL_COMMIT      0
#define ADD_MOD         1
#define DEL_DIR_COMMIT  2


#define COM_ACK         10
#define COM_ERR         11
#define DIR_ERR         12
#define COM_SND_DIRLIST 20
#define COM_SERV_FIFO   30
#define SND_DIR_NAME    21
#define COM_END         90
#define SND_FILE        22
#define COM_SND_FILES   40
#define COM_LOGOUT      99
#define COM_RCV_COMMIT  50
#define COM_SND_COMMIT  51
#define COM_RMV_OK      60
#define WILL_UPDATE     70
#define SND_PRIV        23
/* For commit a delete */
#define COMMIT_OK       52

/* Syslog debug levels */

#define CRITIC          1
#define ERROR           2
#define INFO            3

/* TIMEOUT for selects */
#define SEC_TIMEOUT     1

/* Queue Message */
#define MAIN_QM_ID      9999    // para TCP
#define PUBLIC_MQSERV   8888    // para MQ


/* READ WITH TIMEOUT */
#define TIMEOUT             1

/*INOTIFY*/
#define ADD_MASK            256
#define MOD_MASK            2
#define DEL_MASK            512
#define ADD_DIR             1073742080
#define DEL_DIR             1073742336
#define MOVE_TO_MASK        128
#define MOVE_FROM_MASK      64

#endif /*GENERAL_H_*/
